Types in MathNet.Numerics.LinearAlgebra
Public Methods
Vector<T> Dense(int length, Func<int, T> init)
Create a new dense vector and initialize each value using the provided init function.
Vector<T> Dense(int length, T value)
Create a new dense vector and initialize each value using the provided value.
Create a dense vector of T that is directly bound to the specified array.
Create a new dense vector straight from an initialized vector storage instance.
The storage is used directly without copying.
Intended for advanced scenarios where you're working directly with
storage for performance or interop reasons.
Create a dense vector of T with the given size.
Parameters
int
size
Vector<T> DenseOfArray(T[] array)
Create a new dense vector as a copy of the given array.
This new vector will be independent from the array.
A new memory block will be allocated for storing the vector.
Vector<T> DenseOfEnumerable(IEnumerable<T> enumerable)
Create a new dense vector as a copy of the given enumerable.
This new vector will be independent from the enumerable.
A new memory block will be allocated for storing the vector.
Vector<T> DenseOfIndexed(int length, IEnumerable<Tuple<int, T>> enumerable)
Create a new dense vector as a copy of the given indexed enumerable.
Keys must be provided at most once, zero is assumed if a key is omitted.
This new vector will be independent from the enumerable.
A new memory block will be allocated for storing the vector.
Create a new dense vector as a copy of the given other vector.
This new vector will be independent from the other vector.
A new memory block will be allocated for storing the vector.
Create a new vector straight from an initialized matrix storage instance.
If you have an instance of a discrete storage type instead, use their direct methods instead.
Vector<T> Random(int length)
Create a new dense vector with values sampled from the standard distribution with a system random source.
Create a new dense vector with values sampled from the provided random distribution.
Vector<T> Random(int length, int seed)
Create a new dense vector with values sampled from the standard distribution with a system random source.
Create a new vector with a type that can represent and is closest to both provided samples.
Create a new vector with a type that can represent and is closest to both provided samples and the dimensions of example.
Create a new vector with a type that can represent and is closest to both provided samples.
Create a new vector with the same kind of the provided example.
Create a new vector with the same kind of the provided example.
Create a new vector with the same kind and dimension of the provided example.
Vector<T> Sparse(int length, T value)
Create a new sparse vector and initialize each value using the provided value.
Create a sparse vector of T with the given size.
Parameters
int
size
Create a new sparse vector straight from an initialized vector storage instance.
The storage is used directly without copying.
Intended for advanced scenarios where you're working directly with
storage for performance or interop reasons.
Vector<T> Sparse(int length, Func<int, T> init)
Create a new sparse vector and initialize each value using the provided init function.
Vector<T> SparseOfArray(T[] array)
Create a new sparse vector as a copy of the given array.
This new vector will be independent from the array.
A new memory block will be allocated for storing the vector.
Vector<T> SparseOfEnumerable(IEnumerable<T> enumerable)
Create a new sparse vector as a copy of the given enumerable.
This new vector will be independent from the enumerable.
A new memory block will be allocated for storing the vector.
Vector<T> SparseOfIndexed(int length, IEnumerable<Tuple<int, T>> enumerable)
Create a new sparse vector as a copy of the given indexed enumerable.
Keys must be provided at most once, zero is assumed if a key is omitted.
This new vector will be independent from the enumerable.
A new memory block will be allocated for storing the vector.
Create a new sparse vector as a copy of the given other vector.
This new vector will be independent from the other vector.
A new memory block will be allocated for storing the vector.
Public Properties
T One get;
Gets the value of 1.0
for type T.
T Zero get;
Gets the value of 0.0
for type T.